package com.example.user.constants;

import com.example.framework.common.exception.ErrorCode;
import com.example.framework.common.exception.enums.GlobalErrorCodeConstants;

public interface ErrorCodeConstants extends GlobalErrorCodeConstants {

    ErrorCode CODE_EXPIRED = new ErrorCode(1_000_000, "验证码已过期");
    ErrorCode CODE_ERROR = new ErrorCode(1_000_001, "验证码错误");
    ErrorCode TOO_MANY_CODE_REQUESTS = new ErrorCode(1_000_002, "验证码发送过于频繁");
    ErrorCode CODE_LIMITED = new ErrorCode(1_000_003, "已达验证码发送次数上限，请在{}再试");
    ErrorCode CODE_DAILY_LIMITED = new ErrorCode(1_000_004, "已达验证码发送次数上限，请明天再试");

    ErrorCode CAPTCHA_CODE_EXPIRED = new ErrorCode(1_001_000, "滑块验证码已过期");

    ErrorCode USER_PASSWORD_ERROR = new ErrorCode(1_002_000, "原密码错误");

    // ========== 菜单模块 ==========
    ErrorCode MENU_NAME_DUPLICATE = new ErrorCode(1_003_000, "已经存在该名字的菜单");
    ErrorCode MENU_PARENT_NOT_EXISTS = new ErrorCode(1_003_001, "父菜单不存在");
    ErrorCode MENU_PARENT_ERROR = new ErrorCode(1_003_002, "不能设置自己为父菜单");
    ErrorCode MENU_NOT_EXISTS = new ErrorCode(1_003_003, "菜单不存在");
    ErrorCode MENU_EXISTS_CHILDREN = new ErrorCode(1_003_004, "存在子菜单，无法删除");

    // ========== 角色模块 ==========
    ErrorCode ROLE_NOT_EXISTS = new ErrorCode(1_004_000, "角色不存在");
    ErrorCode ROLE_NAME_DUPLICATE = new ErrorCode(1_004_001, "已经存在名为【{}】的角色");
}
